sql_statement = ""
with open('barrios_cartagena.txt') as f:
  for line in f:
    line_no_newline = line.rstrip('\n')
    sql_statement += 'INSERT INTO "MaeBarrio" ("usuarioGrab", "usuarioUltMod", "activo", "codMaeBarrio", "codMaeCiudad", "nombreMaeBarrio", "localidad")\n'
    sql_statement += "VALUES('ADMIN', 'ADMIN', TRUE, '" + line_no_newline + "', 'Cartagena', '" + line_no_newline + "', '');\n\n"

with open('insertar_maestros_barrios.sql', 'w') as f:
  f.write(sql_statement)

